package net.zjitc.controller;

import net.zjitc.pojo.Evaluate;
import net.zjitc.pojo.Orderitem;
import net.zjitc.pojo.Orders;
import net.zjitc.service.OrderService;
import net.zjitc.service.impl.OrderServiceImpl;
import net.zjitc.utils.dispacher.URLMapping;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * Created by Administrator on 2017/12/24.
 */
public class AdminOrder {
    OrderService orderService=new OrderServiceImpl();
    @URLMapping(url = "/findOrderAll")
    public String orderAll(HttpServletRequest request, HttpServletResponse response){

        List<Orders> list=orderService.findOrderAll();
        request.setAttribute("list",list );
        return "/admin/order/orderList.jsp";
    }
    @URLMapping(url = "/findOrderitemAll")
    public String orderitemAll(HttpServletRequest request, HttpServletResponse response){
        List<Orderitem> listitem=orderService.findOrderitemAll();
        request.setAttribute("listitem",listitem );
        return "/admin/order/orderitemList.jsp";
    }
    @URLMapping(url = "/findEvaluateAll")
    public String evaluateAll(HttpServletRequest request, HttpServletResponse response){
        List<Evaluate> list=orderService.findEvaluateAll();
        request.setAttribute("evaluateList",list );
        return "/admin/order/evaluateList.jsp";
    }
}
